﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DocumentFormat.OpenXml.Spreadsheet;
using DocumentFormat.OpenXml.Packaging;
using DocumentFormat.OpenXml;
using QuanLyGiaoVuService.Domain;
using System.IO;

namespace QuanLyGiaoVuService.CommonServices
{
    public interface IExcelService
    {
        void ReadFile();
        IEnumerable<TemplateToken> GetInfoFromTemplateFile(Stream fileStream, IEnumerable<TemplateToken> tokens, out uint startRowIndex);
        bool ExportToExcelWithTemplate<T>(ref MemoryStream templateFileStream, List<TemplateToken> tokenList, List<T> dataObjectList, uint startRowIndex);
        IEnumerable<TemplateToken> GetAllTokenFromTemplate(string templateName);
        IEnumerable<ExcelReadDataModel> ReadExcelDataFile(Stream fileStream, int startRowIndex, int endRowIndex, string indexColumn, string valueColumn);
        IEnumerable<T> ReadExcelDataFile<T>(Stream fileStream, IList<TemplateToken> tokenList, int startRowIndex);
    }
}
